home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / Include / fsdm.h < prev    next >
C/C++ Source or Header  |  1991-07-02  |  19KB  |  482 lines

  1. /* 
  2.  * fsdm.h --
  3.  *
  4.  *    Disk management module -- Definitions related to the storage of 
  5.  *    filesystems on a disk.
  6.  *
  7.  * Copyright 1990 Regents of the University of California
  8.  * Permission to use, copy, modify, and distribute this
  9.  * software and its documentation for any purpose and without
  10.  * fee is hereby granted, provided that the above copyright
  11.  * notice appear in all copies.  The University of California
  12.  * makes no representations about the suitability of this
  13.  * software for any purpose.  It is provided "as is" without
  14.  * express or implied warranty.
  15.  *
  16.  * $Header: /sprite/src/kernel/fsdm/RCS/fsdm.h,v 9.11 91/07/02 10:51:44 mendel Exp $ SPRITE (Berkeley)
  17.  */
  18.  
  19. #ifndef _FSDM
  20. #define _FSDM
  21.  
  22. #ifdef KERNEL
  23. #include <dev.h>
  24. #include <fslcl.h>
  25. #include <fsioFile.h>
  26. #include <fscache.h>
  27. #else
  28. #include <kernel/dev.h>
  29. #endif
  30.  
  31. /*
  32.  * A disk is partitioned into domains that are managed separately.
  33.  * Each domain takes up an even number of cylinders.
  34.  * An array of Fsdm_DiskPartition's is kept on the disk to define how the
  35.  * disk is divided into domains.
  36.  *
  37.  * FSDM_NUM_DISK_PARTS defines how many different domains there could be
  38.  *    on a disk.  Generally, not all the domains are defined.  
  39.  */
  40. #define FSDM_NUM_DISK_PARTS    8
  41.  
  42. typedef struct Fsdm_DiskPartition {
  43.     int firstCylinder;    /* The first cylinder in the partition. */
  44.     int numCylinders;    /* The number of cylinders in the partition.  Set
  45.              * this to zero for unused partitions. */
  46. } Fsdm_DiskPartition;
  47.  
  48. /*
  49.  * The first few blocks of each domain are reserved.  They contain a copy
  50.  * of the Disk Header, a copy of the boot program, and finally Domain
  51.  * Header information.  The Disk Header defines the division of the disk's
  52.  * cylinders into domains,  and the layout of the rest of the reserved
  53.  * blocks.  The Disk Header is replicated on the zero'th sector of each
  54.  * domain. For the Sun implementation, the boot program is expected to
  55.  * start in sector #1. The boot program on
  56.  * the zero'th cylinder of the disk is used automatically, although other
  57.  * boot program locations can be specified manually.
  58.  *
  59.  */
  60.  
  61. #define FSDM_MAX_BOOT_SECTORS    128
  62. #define FSDM_BOOT_SECTOR_INC    16
  63.  
  64. typedef struct Fsdm_DiskHeader {
  65.     char asciiLabel[128];    /* Human readable string used for manufacturer's
  66.                  * model number and redudant geometry info */
  67.     /*
  68.      * Padding is used to shove the following data down so the check sum
  69.      * occurs at the end of the sector.  The 10 in the declaration indicates
  70.      * how may integer fields there are in this struct.
  71.      */
  72.     char pad[DEV_BYTES_PER_SECTOR - 128 -
  73.          (12 + FSDM_NUM_DISK_PARTS * 2) * sizeof(int)];
  74.     unsigned int magic;        /* Magic number used for consistency check */
  75.     int numCylinders;        /* The number of cylinders on the disk */
  76.     int numAltCylinders;    /* # of alternates used for bad blocks */
  77.     int numHeads;        /* # of surfaces on the disk */
  78.     int numSectors;        /* # of sectors per track */
  79.     int bootSector;        /* The starting sector of the boot program.
  80.                  * This is usually 1. */
  81.     int numBootSectors;        /* The number of sectors in the boot program.
  82.                  * This is usually 15. */
  83.     int summarySector;        /* Index of sector used for summary info */
  84.     int domainSector;        /* The sector where the domain header starts.*/
  85.     int numDomainSectors;    /* The number of sectors taken up by the
  86.                  * domain header */
  87.     int partition;        /* Index of the partition that this copy of
  88.                  * the Disk Header is on.  Each partition has
  89.                  * a copy of the Disk Header */
  90.     Fsdm_DiskPartition map[FSDM_NUM_DISK_PARTS];    /* Partition map */
  91.     int checkSum;        /* Checksum such that an XOR of all the ints
  92.                  * in the sector results in the same thing
  93.                  * as the magic number */
  94. } Fsdm_DiskHeader;
  95.  
  96. #define FSDM_DISK_MAGIC    (unsigned int)0xD15CFEBA    /* 'disk fever' */
  97.  
  98.  
  99.  
  100.  
  101. /*
  102.  * A File Descriptor is kept on disk for every file in a domain.  It
  103.  * contains administrative information and also the indexing structure
  104.  * used to access the file's data blocks.
  105.  */
  106.  
  107. #define FSDM_NUM_DIRECT_BLOCKS    10
  108. #define FSDM_NUM_INDIRECT_BLOCKS    3
  109. #define    FSDM_INDICES_PER_BLOCK    1024
  110.  
  111. #define FSDM_MAX_FILE_DESC_SIZE    128
  112. #define FSDM_FILE_DESC_PER_BLOCK    (FS_BLOCK_SIZE / FSDM_MAX_FILE_DESC_SIZE)
  113.  
  114. typedef struct Fsdm_FileDescriptor {
  115.     unsigned short magic;/* FSDM_FD_MAGIC, for disk consistency check */
  116.     short flags;    /* FSDM_FD_FREE, FSDM_FD_ALLOC, FSDM_FD_RESERVED */
  117.     short fileType;    /* FS_REGULAR, FS_DIRECTORY, FS_PIPE, FS_DEVICE,
  118.              * FS_SYMLINK, FS_RMTLINK */
  119.     short permissions;    /* 9 permission bits plus flags for set user ID
  120.              * upon execution */
  121.     int uid;        /* ID of owner */
  122.     int gid;        /* Group ID of owner */
  123.     int lastByte;    /* The number of bytes in the file */
  124.     int lastByteXtra;    /* (Some day we may have 64 bit sizes?) */
  125.     int firstByte;    /* For named pipes, offset of the first valid byte */
  126.     int userType;    /* Information about what sort of user file it is. */
  127.     int numLinks;    /* Number of directory references to the file */
  128.     int devServerID;    /* ID of the host that controls the device */
  129.     short devType;    /* For devices, their type.  For others this is the
  130.              * type of disk the file is stored on */
  131.     unsigned short devUnit;    /* For devices, their unit number.  For others,
  132.              * the unit indicates the disk partition */
  133.     /*
  134.      * All times in seconds since Jan 1 1970, Greenwich time.
  135.      */
  136.  
  137.     int createTime;    /* Time the file was created. */
  138.     int accessTime;    /* Time of last access.  This is not updated by
  139.              * directory traversals. */
  140.     int descModifyTime;    /* Time of last modification to the file descriptor */
  141.     int dataModifyTime;    /* Time of last modification to the file data */
  142.  
  143.     /*
  144.      * Pointers to the data blocks of the file.   The pointers are really
  145.      * indexes into the array of blocks stored in the data block section
  146.      * of a partition.  The direct array contains the indexes of the first
  147.      * several blocks of the files.  The indirect indexes are interpreted
  148.      * as follows.  The first indirect index is the index of a block that
  149.      * contains 1 K indexes of data blocks.  This is called a singly-indirect
  150.      * block.  The second indirect index is the index of a block that
  151.      * contains 1 K indexes of singly-indirect blocks.  This is called
  152.      * a doubly-indirect block.  Finally, the third indirect index is the index
  153.      * of a block that contains 1 K indexes of doubly-indirect blocks.
  154.      * Each data block contains 4Kbytes, so this indexing scheme supports
  155.      * files up to 40K + 4Meg + 4Gig + 4Pig bytes.
  156.      *
  157.      * The values of the direct and indirect indexes are indexes of
  158.      * fragments, ie. 1k pieces.  All the but the last index point to the
  159.      * beginning of a filesystem block, ie. 4K.  The last valid direct
  160.      * block may point to a fragment, and fragments can start on 1K
  161.      * boundaries.
  162.      */
  163.  
  164.     int direct[FSDM_NUM_DIRECT_BLOCKS];
  165.     int indirect[FSDM_NUM_INDIRECT_BLOCKS];
  166.     int numKbytes;    /* The number of KiloBytes acutally allocated towards
  167.              * the file on disk.  This accounts for fragments
  168.              * and indirect blocks. */
  169.     int version;    /* Version number of the handle for the file.  Needed
  170.              * on disk for recovery purposes (client re-open */
  171. } Fsdm_FileDescriptor;
  172.  
  173. /*
  174.  * Magic number and flag definitions for file descriptors.
  175.  *    FSDM_FD_FREE    The file descriptor is unused
  176.  *    FSDM_FD_ALLOC    The file descriptor is used for a file.
  177.  *    FSDM_FD_RESERVED The file descriptor is reserved and not for use.
  178.  *    FSDM_FD_DIRTY    The file descriptor has been modified since the
  179.  *            last time that it was written to disk.
  180.  *      FSDM_FD_PERMISSIONS_DIRTY  Premissions field (permissions) have be
  181.  *                    changed since the descriptor last written.
  182.  *      FSDM_FD_SIZE_DIRTY         Size fields (lastByte lastByteXtra,
  183.  *                   firstByte, numBlocks) have been changed
  184.  *                   size the descriptor was last written.
  185.  *      FSDM_FD_USERTYPE_DIRTY     The user type field has changed since the
  186.  *                   descriptor was last written.
  187.  *      FSDM_FD_LINKS_DIRTY         The number of links has changed since the
  188.  *                   descriptor was written.
  189.  *    FSDM_FD_ACCESSTIME_DIRTY   The access time has changed since the
  190.  *                   descriptor was written.
  191.  *    FSDM_FD_MODTIME_DIRTY       The modify time has changed since the
  192.  *                   descriptor was written.
  193.  *    FSDM_FD_INDEX_DIRTY       The file index fields (direct, indirect) 
  194.  *                   have changed since the descriptor was
  195.  *                   written.
  196.  *    FSDM_FD_VERSION_DIRTY       The file version number changed since the
  197.  *                   descriptor was written.
  198.  *    FSDM_FD_OTHERS_DIRTY       Some other (not listed above) field has
  199.  *                   changed since the descriptor was written.
  200.  *
  201.  */
  202.  
  203. #define FSDM_FD_MAGIC    (unsigned short)0xF1D0
  204. #define FSDM_FD_FREE    0x1
  205. #define FSDM_FD_ALLOC    0x2
  206. #define FSDM_FD_RESERVED    0x4
  207. #define FSDM_FD_DIRTY            0xFF8
  208. #define    FSDM_FD_PERMISSIONS_DIRTY   0x010    
  209. #define    FSDM_FD_SIZE_DIRTY        0x020
  210. #define    FSDM_FD_USERTYPE_DIRTY        0x040
  211. #define    FSDM_FD_LINKS_DIRTY        0x080
  212. #define    FSDM_FD_ACCESSTIME_DIRTY    0x100
  213. #define    FSDM_FD_MODTIME_DIRTY        0x200
  214. #define    FSDM_FD_INDEX_DIRTY        0x400
  215. #define    FSDM_FD_VERSION_DIRTY        0x800
  216. #define    FSDM_FD_OTHERS_DIRTY        0x008
  217.  
  218. /*
  219.  * The special index value FSDM_NIL_INDEX for direct[] and indirect[]
  220.  * means there is no block allocated for that index.
  221.  */ 
  222. #define FSDM_NIL_INDEX    -1
  223.  
  224. /*
  225.  * Types of indexing.  Order is important here because the indirect and
  226.  * double indirect types can be used to index into the indirect block 
  227.  * pointers in the file descriptor.
  228.  */
  229.  
  230. #define    FSDM_INDIRECT        0 
  231. #define    FSDM_DBL_INDIRECT        1
  232. #define    FSDM_DIRECT        2
  233.  
  234. /*
  235.  * The bad block file, the root directory of a domain and the lost and found 
  236.  * directory have well known file numbers.
  237.  */
  238. #define FSDM_BAD_BLOCK_FILE_NUMBER    1
  239. #define FSDM_ROOT_FILE_NUMBER        2
  240. #define FSDM_LOST_FOUND_FILE_NUMBER    3
  241.  
  242. /*
  243.  * Directry change log operations and flags.
  244.  *    Operations:
  245.  * FSDM_LOG_CREATE        Creating a new object in a directory.    
  246.  * FSDM_LOG_UNLINK        Unlinking an object from a directory.    
  247.  * FSDM_LOG_LINK        Linking to an existing object.    
  248.  * FSDM_LOG_RENAME_DELETE    Deleting an object as part of a rename.    
  249.  * FSDM_LOG_RENAME_LINK        Linking to an object as part of a rename.
  250.  * FSDM_LOG_RENAME_UNLINK    Unlinking an object as part of a rename.
  251.  * FSDM_LOG_OP_MASK        Mask out the log operation.
  252.  * 
  253.  * Flags:
  254.  *
  255.  * FSDM_LOG_START_ENTRY        Start of change entry
  256.  * FSDM_LOG_END_ENTRY        End of change entry
  257.  * FSDM_LOG_STILL_OPEN        File is still open after last unlink.
  258.  * FSDM_LOG_IS_DIRECTORY    File is a directory.
  259.  */
  260.  
  261. #define    FSDM_LOG_CREATE        1
  262. #define    FSDM_LOG_UNLINK        2
  263. #define    FSDM_LOG_LINK        3
  264. #define    FSDM_LOG_RENAME_DELETE    4
  265. #define    FSDM_LOG_RENAME_LINK    5
  266. #define    FSDM_LOG_RENAME_UNLINK    6
  267. #define    FSDM_LOG_OP_MASK    0xff
  268.  
  269. #define    FSDM_LOG_START_ENTRY    0x100
  270. #define    FSDM_LOG_END_ENTRY    0x200
  271. #define    FSDM_LOG_STILL_OPEN    0x1000
  272. #define FSDM_LOG_IS_DIRECTORY    0x2000
  273.  
  274. #ifdef KERNEL
  275. /*
  276.  * Structure for each domain.
  277.  */
  278.  
  279. typedef struct Fsdm_Domain {
  280.     char    *domainPrefix;      /* Prefix of this domain. */
  281.     int        domainNumber;       /* Number of this domain. */
  282.     int        flags;          /* Flags defined below. */        
  283.     int        refCount;      /* Number of active users of the domain. */
  284.     Sync_Condition condition;      /* Condition to wait on. */
  285.     Fscache_Backend *backendPtr;  /* Cache backend for this domain. */
  286.     struct Fsdm_DomainOps *domainOpsPtr;
  287.                   /* Domain specific data and routines. */
  288.     ClientData    clientData;      /* Domain specific info. */
  289. } Fsdm_Domain;
  290. /*
  291.  * Structure defining the domain specific routines and data.
  292.  */
  293. typedef struct Fsdm_DomainOps {
  294.     ReturnStatus (*attachDisk) _ARGS_((Fs_Device *devicePtr, 
  295.                     char *localName, int flags, 
  296.                     int *domainNumPtr));
  297.                      /* Attach and install the domain from 
  298.                       * the specified disk partition. */
  299.     ReturnStatus (*detachDisk) _ARGS_((Fsdm_Domain *domainPtr));
  300.                      /* Detach  the domain from 
  301.                       * the specified disk partition. */
  302.     ReturnStatus (*writeBack) _ARGS_((Fsdm_Domain *domainPtr, 
  303.                       Boolean shutdown));   
  304.                      /* Writeback the internal data structures
  305.                       * for the specified domain. */
  306.     ReturnStatus (*rereadSummary) _ARGS_((Fsdm_Domain *domainPtr));
  307.                     /* Reread the domain info from disk. */
  308.  
  309.     ReturnStatus (*domainInfo) _ARGS_ ((Fsdm_Domain *domainPtr, 
  310.                 Fs_DomainInfo *domainInfoPtr));
  311.                      /* Return a Fs_DomainInfo for the 
  312.                       * specified domain.  */
  313.     ReturnStatus (*blockAlloc) _ARGS_((Fsdm_Domain *domainPtr, 
  314.                       Fsio_FileIOHandle *handlePtr, int offset,
  315.                       int numBytes, int flags, 
  316.                       int *blockAddrPtr, Boolean *newBlockPtr));
  317.                     /* Allocate a block for a file. */
  318.     ReturnStatus (*getNewFileNumber) _ARGS_((Fsdm_Domain *domainPtr, 
  319.                         int dirFileNum, 
  320.                         int *fileNumberPtr));
  321.  
  322.                     /* Allocate a file number of a new
  323.                      * file.  */
  324.     ReturnStatus (*freeFileNumber)  _ARGS_((Fsdm_Domain *domainPtr, 
  325.                         int fileNumber));
  326.                     /* Deallocate a file number. */
  327.  
  328.     ReturnStatus (*fileDescInit) _ARGS_((Fsdm_Domain *domainPtr, 
  329.                     int fileNumber, int type, 
  330.                     int permissions, int uid, int gid, 
  331.                     Fsdm_FileDescriptor *fileDescPtr));
  332.                      /* Initialize a new file descriptor. */
  333.  
  334.     ReturnStatus (*fileDescFetch)  _ARGS_((Fsdm_Domain *domainPtr, 
  335.                        int fileNumber, 
  336.                        Fsdm_FileDescriptor *fileDescPtr));
  337.                      /* Fetch a file descriptor from disk. */
  338.  
  339.     ReturnStatus (*fileDescStore)  _ARGS_((Fsdm_Domain *domainPtr, 
  340.                        Fsio_FileIOHandle *handlePtr, 
  341.                        int fileNumber, 
  342.                        Fsdm_FileDescriptor *fileDescPtr,
  343.                        Boolean forceOut));
  344.                      /* Store a file descriptor back into it's
  345.                       * disk block. */
  346.     ReturnStatus (*fileBlockRead) _ARGS_((Fsdm_Domain *domainPtr, 
  347.                      Fsio_FileIOHandle *handlePtr, 
  348.                      Fscache_Block *blockPtr));
  349.  
  350.     ReturnStatus (*fileBlockWrite) _ARGS_((Fsdm_Domain *domainPtr, 
  351.                        Fsio_FileIOHandle *handlePtr,
  352.                        Fscache_Block *blockPtr));
  353.  
  354.     ReturnStatus (*fileTrunc)  _ARGS_((Fsdm_Domain *domainPtr, 
  355.                     Fsio_FileIOHandle *handlePtr, 
  356.                     int size, Boolean delete));
  357.                      /* Truncate the file to the specifed 
  358.                       * length. */
  359.     ClientData    (*dirOpStart) _ARGS_((Fsdm_Domain *domainPtr, int opFlags,
  360.                 char *name, int nameLen, int fileNumber, 
  361.                 Fsdm_FileDescriptor *fileDescPtr, 
  362.                 int dirFileNumber, int dirOffset, 
  363.                 Fsdm_FileDescriptor *dirFileDescPtr));
  364.                      /* Directory operation start. */    
  365.  
  366.     void    (*dirOpEnd) _ARGS_((Fsdm_Domain *domainPtr,
  367.                     ClientData clientData, ReturnStatus status,
  368.                     int opFlags, char *name, int nameLen,
  369.                     int fileNumber, 
  370.                     Fsdm_FileDescriptor *fileDescPtr, 
  371.                     int dirFileNumber,    int dirOffset, 
  372.                     Fsdm_FileDescriptor *dirFileDescPtr));   
  373.                      /* Directory operation end. */    
  374.  
  375. } Fsdm_DomainOps;
  376.  
  377.  
  378.  
  379. /*
  380.  * Domain flags used for two stage process of detaching a domain:
  381.  *
  382.  *    FSDM_DOMAIN_GOING_DOWN    This domain is being detached.
  383.  *    FSDM_DOMAIN_DOWN        The domain is detached.
  384.  *    FSDM_DOMAIN_ATTACH_BOOT   The domain was attached by the kernel
  385.  *                during boot.
  386.  */
  387. #define    FSDM_DOMAIN_GOING_DOWN    0x1
  388. #define    FSDM_DOMAIN_DOWN         0x2
  389. #define FSDM_DOMAIN_ATTACH_BOOT        0x4
  390.  
  391.  
  392. /*
  393.  * Whether or not to keep information about file I/O by user file type.
  394.  */
  395. extern Boolean fsdmKeepTypeInfo;
  396.  
  397.  
  398.  
  399.  
  400. /*
  401.  * Declarations for the file descriptor allocation routines.
  402.  */
  403. extern ReturnStatus Fsdm_FileDescInit _ARGS_((Fsdm_Domain *domainPtr, 
  404.         int fileNumber, int type, int permissions, int uid, int gid, 
  405.         Fsdm_FileDescriptor *fileDescPtr));
  406. extern ReturnStatus Fsdm_FileDescFetch _ARGS_((Fsdm_Domain *domainPtr, 
  407.         int fileNumber, Fsdm_FileDescriptor *fileDescPtr));
  408. extern ReturnStatus Fsdm_FileDescStore _ARGS_((Fsio_FileIOHandle *handlePtr,
  409.         Boolean forceOut));
  410.  
  411. extern ReturnStatus Fsdm_GetNewFileNumber _ARGS_((Fsdm_Domain *domainPtr, 
  412.         int dirFileNum, int *fileNumberPtr));
  413. extern ReturnStatus Fsdm_FreeFileNumber _ARGS_((Fsdm_Domain *domainPtr, 
  414.         int fileNumber));
  415. extern ReturnStatus Fsdm_FileDescWriteBack _ARGS_((Fsio_FileIOHandle *handlePtr,        Boolean doWriteBack));
  416. extern ReturnStatus Fsdm_FileTrunc _ARGS_((Fs_HandleHeader *hdrPtr, 
  417.         int size, Boolean delete));
  418. extern ReturnStatus Fsdm_BlockAllocate _ARGS_((Fs_HandleHeader *hdrPtr, 
  419.         int offset, int numBytes, int flags, int *blockAddrPtr, 
  420.         Boolean *newBlockPtr));
  421.  
  422.  
  423. extern ReturnStatus Fsdm_UpdateDescAttr _ARGS_((Fsio_FileIOHandle *handlePtr, 
  424.         Fscache_Attributes *attrPtr, int dirtyFlags));
  425.  
  426. /*
  427.  * Routines for attaching/detaching disk.
  428.  */
  429. extern ReturnStatus Fsdm_AttachDiskByHandle _ARGS_((
  430.         Fs_HandleHeader *ioHandlePtr, char *localName, int flags));
  431. extern ReturnStatus Fsdm_AttachDisk _ARGS_((Fs_Device *devicePtr, 
  432.         char *localName, int flags));
  433. extern ReturnStatus Fsdm_DetachDisk _ARGS_((char *prefixName));
  434.  
  435. /*
  436.  * Routines to manipulate domains.
  437.  */
  438. extern Fsdm_Domain *Fsdm_DomainFetch _ARGS_((int domain, Boolean dontStop));
  439. extern void Fsdm_DomainRelease _ARGS_((int domainNum));
  440. extern ReturnStatus Fsdm_InstallDomain _ARGS_((int domainNumber, 
  441.             int serverID, char *prefixName, int flags, 
  442.             Fsdm_Domain **domainPtrPtr));
  443. extern ReturnStatus Fsdm_DomainInfo _ARGS_((Fs_FileID *fileIDPtr, 
  444.             Fs_DomainInfo *domainInfoPtr));
  445. extern void Fsdm_DomainWriteBack _ARGS_((int domain, Boolean shutdown, 
  446.             Boolean detach));
  447. extern ReturnStatus Fsdm_RereadSummaryInfo _ARGS_((char *prefixName));
  448. extern ReturnStatus Fsdm_FileBlockRead _ARGS_((Fs_HandleHeader *hdrPtr,
  449.             Fscache_Block *blockPtr, 
  450.             Sync_RemoteWaiter *remoteWaitPtr));
  451. extern ReturnStatus Fsdm_FileBlockWrite _ARGS_((Fs_HandleHeader *hdrPtr, 
  452.             Fscache_Block *blockPtr, int flags));
  453.  
  454. /*
  455.  * Directory log routines.
  456.  */
  457. extern ClientData Fsdm_DirOpStart _ARGS_((int opFlags, 
  458.         Fsio_FileIOHandle *dirHandlePtr, int dirOffset, char *name, 
  459.         int nameLen, int fileNumber, int type, 
  460.         Fsdm_FileDescriptor *fileDescPtr));
  461. extern void Fsdm_DirOpEnd _ARGS_((int opFlags, Fsio_FileIOHandle *dirHandlePtr,
  462.         int dirOffset, char *name, int nameLen, int fileNumber,
  463.         int type, Fsdm_FileDescriptor *fileDescPtr,
  464.         ClientData clientData, ReturnStatus status));
  465.  
  466. /*
  467.  * Miscellaneous
  468.  */
  469. extern int Fsdm_FindFileType _ARGS_((Fscache_FileInfo *cacheInfoPtr));
  470. extern void Fsdm_Init _ARGS_((void));
  471. extern Boolean Fsdm_IsSunLabel _ARGS_((Address buffer));
  472. extern Boolean Fsdm_IsSpriteLabel _ARGS_((Address buffer));
  473. extern Boolean Fsdm_IsDecLabel _ARGS_((Address buffer));
  474. extern void Fsdm_RegisterDiskManager _ARGS_((char *typeName, 
  475.         ReturnStatus (*attachProc)(Fs_Device *devicePtr,
  476.                        char *localName, int flags, 
  477.                        int *domainNumPtr)));
  478.  
  479. #endif /* KERNEL */
  480.  
  481. #endif /* _FSDM */
  482.